(function () {
    // 主函数
    function main() {
        

        // swiper的初始化
        var swiper = new Swiper('.swiper-container',
            {
                autoplay: true,
                pagination: {
                    el: '.swiper-pagination',
                },
                navigation: {
                    nextEl: '.swiper-button-next',
                    prevEl: '.swiper-button-prev',
                },
            });
        
        // 动态创建轮播图
        images.forEach(function (item) {
            var view = $("<div class='swiper-slide' style='background-image:url(\"" + item + "\")'></div>");
            banners.append(view);
        });

    }
    main();
})();

